import Vue from 'vue'
import Vuex from 'vuex'

import config from '../common/config'
Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		websocketState: false,
		websocketData: {}
	},
	mutations: {
		setWebsocketData(state, data) {
			state.websocketData = data
		}
	},
	actions: {
		setWebSocketData({
			commit,
			state
		}, socketData) {
			commit('setWebsocketData', socketData)
		}
	}
})

export default store
